<?php
namespace Admin\Controller;
use Think\Controller;

class MembereditController extends Controller {
    public function index(){
        
    	$uid = I('get.uid');

    	$user = M('user')->find($uid);

    	$this->assign('user',$user);

        $this->display();
    }

    public function edit(){
    	$data = I('post.');

    	$uid = $data['uid'];

    	$res = M('user')->where(['uid'=>$uid])->save($data);

    	if($res){
    		$this->ajaxReturn(['error'=>0,'info'=>'修改成功']);
    	}else{
    		$this->ajaxReturn(['error'=>1,'info'=>'修改失败']);
    	}
    }
}

?>